package com.sl.au.service;

import java.util.List;

import com.sl.au.entity.BussinessCheck;
import com.sl.au.entity.BusinessCheckDetail;
import com.sl.au.entity.BussinessInspection;
import com.sl.au.entity.User;
import com.sl.au.repository.BusinessCheckDetailRepository;
import com.sl.au.repository.BussinessCheckRepository;
public interface BussinessCheckService extends BaseService{
	BussinessCheckRepository getRepository();
	BusinessCheckDetailRepository getDetailRepository();
	List<BussinessCheck> getPage(int start, int length, String key, String orderName, String dir);

	int getCount(String key);

	List<BussinessCheck> getChecks(int start, int length, String key, String orderName, String dir);
	
	List<BussinessInspection> getChecksByTime(int start, int length, String id, String orderName, String dir);
	
	List<BussinessInspection> getChecksByTimeAndNeedCheck(int start, int length, String id, String orderName, String dir);
	
	List<BussinessInspection> getChecksByHistory(int start, int length, String id, String orderName, String dir);

	void save(BussinessCheck bussinessCheck);
	
	void saveAll(BussinessCheck bussinessCheck,List<BusinessCheckDetail> businessCheckDetail,List<BussinessInspection> bussinessInspection);

	void deleteById(String id);

	BussinessCheck findById(String id);
	
	List<BussinessCheck> getCheckHistory(int start, int length,String id, User user,String orderName);
	List<BussinessCheck> getCheckHistory(int start, int length,String id,String orderName);
	List<BusinessCheckDetail> getCheckDetailByCheckId(int start, int length,String id,String orderName);
	List<BussinessInspection> getInspectionByCheckId(int start, int length, String id, String orderName);
}
